<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>备注信息</title>
    <link rel="stylesheet" href="/Public/css/gxxj/public_O.css">
    <link rel="stylesheet" href="/Public/css/gxxj/knomledge.css">
    <style type="text/css">
        body{
            font-size: 12px;
        }
        html {
            background: #fff;
            height: 100%;
        }

    </style>
</head>
<body style="padding:10px;">
<div>
    <table class="search_table" style="width: 100%">
        <tr>
            <th>订单号</th>
            <th>备注信息</th>
            <!--<th>回答客服</th>-->
            <th>操作管理员</th>
            <th>备注时间</th>
        </tr>
        <volist name="data" id="vo">
            <tr>
                <td><{$vo.repayment_no}></td>
                <td><{$vo.reason}></td>
                <td><{$vo.name}></td>
                <td><{$vo.ctime}></td>
            </tr>
        </volist>
    </table>
</div>
<div class="main" id="mark_input">
<form method="post" onsubmit="return false">
    <textarea class="input_bg_color" name="info" id="info" cols="70" rows="9" placeholder="请输入备注信息" style="width: 90%"></textarea>
    <input class="bg_color_red color_white question_btn" type="button" onclick="w_close()" value="关闭" style="font-size: small;background-color: #57bee9; float: left;padding-left: 10px;padding-right: 10px">
    <input  style="font-size: small; float: left;background-color: #57bee9" class="bg_color_red color_white question_btn" type="button" onclick="add_mark()" value="确认添加">
</form>
</div>
<script type="text/javascript" src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/layer/layer.js"></script>
<script src="/Public/js/layui/layui.js"></script>

<script>
    var type="<{$type}>";
    if(type=='2'){
        $("#mark_input").hide();
    }

    function add_mark() {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        var info=$("#info").val();
        if (info== "") {
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }
        var id="<{$id}>";//逾期表ID
        var number="<{$number}>";//逾期单号
        var url = "<{$SERVER_NAME}>/Overdue/add_mark";
//        var tourl = "<{$SERVER_NAME}>/Overdue/overdue_mark?id="+id;
        $.post(url, {info: info, number: number}, function (data) {
            if (data.code == "1001") {
                layer.alert(data.result, {title: '提示框', icon: 1}, function () {
//                    window.location.href = tourl;
                    w_close();
                    layer.close(index);

                });
            }
            else {
                layer.alert(data.result, {title: '提示框', icon: 2});
                layer.close(index);
            }
        });
        layer.close(index);
    }
    function w_close() {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }


</script>


</body>
</html>